package com.apollow.oschina.ui;

import android.os.Bundle;
import android.support.annotation.Nullable;

import com.apollow.oschina.R;
import com.apollow.oschina.base.BaseActivityVPAdapter;
import com.apollow.oschina.base.BaseVPActivity;
import com.apollow.oschina.fragment.FansFragment;
import com.apollow.oschina.fragment.FollowFragment;

/**
 * Created by Dragon on 2017/1/14.
 */
public class FollowFansActivity extends BaseVPActivity {
    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
//        setContentView(R.layout.activity_follow);
    }

    @Override
    protected String setTitle(String text) {
        text = "关注/粉丝";
        return text;
    }


    @Override
    protected void setupTab(BaseActivityVPAdapter vpAdapter) {
        String[] texts=getResources().getStringArray(R.array.friends_viewpage_arrays);
        vpAdapter.addTab(texts[0], FollowFragment.class,getBundle("关注"));
        vpAdapter.addTab(texts[1], FansFragment.class,getBundle("粉丝"));
        String state = getIntent().getStringExtra("state");
        if("关注".equals(state)){
            mVpFollwFans.setCurrentItem(0);
        }else if ("粉丝".equals(state)){
            mVpFollwFans.setCurrentItem(1);
        }

    }
}
